{extend name='admin@main'}

{block name="button"}

{if auth("admin/product.goods/add")}
<!-- <button data-modal='{:url("add")}' data-title="添加套餐" class='layui-btn layui-btn-sm layui-btn-primary'>添加套餐</button> -->
{/if}


{/block}

{block name="content"}
<div class="think-box-shadow">
    {include file='setup/options/index_search'}
    
    <div class="layui-obj">
        <!--<button data-modal='{:url("add")}' data-title="添加商品" class='layui-btn layui-btn-sm layui-btn-primary'>添加</button>-->
    </div>
   
    <table class="layui-table margin-top-0" lay-skin="line">
        {notempty name='list'}
        <thead>
        <tr>
            <th class='list-table-check-td think-checkbox'>
                <input data-auto-none data-check-target='.list-check-box' type='checkbox'>
            </th>

            <th class='text-left nowrap'>选项名称</th>
            <th class='text-left nowrap'>备注信息</th>
            <th class="text-left">更新时间</th>
            <th></th>
        </tr>
        </thead>
        {/notempty}
        <tbody>
        {foreach $list as $key=>$vo}
        <tr data-dbclick>
            <td class='list-table-check-td think-checkbox'>
                <input class="list-check-box" value='{$vo.id}' type='checkbox'>
            </td>           
            <td class='text-left nowrap'>{$vo.name|default=''}</td>
            <td class='text-left nowrap'>
                {$vo.describe|default=''}
            </td>
            <td class='text-left nowrap'>日期：{$vo.update_at|format_datetime|str_replace=' ','<br><span class="color-desc">时间：',###|raw}</span></td>
            <td class='text-left nowrap'>
                
                {if auth("admin/setup.options/optionList")}
                <a data-dbclick data-title="下拉项列表" class="layui-btn layui-btn-sm" data-open='{:url("optionList")}?id={$vo.id}'>下拉项列表</a>
                {/if}
            </td>
        </tr>
        {/foreach}
        </tbody>
    </table>
    {empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
</div>
<style>
	.layui-obj{
        margin-top: 10px!important;
    }
    .layui-tab{
        margin-top: 10px!important;
    }
	.layui-table td, .layui-table th {
		box-sizing: border-box;
	}
</style>
{/block}
